package com.blog.admin.controller;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping(value = "/admin")
public class PageController {
	@RequestMapping(value = "/welcomePage", method = RequestMethod.GET)
	public String welcomePage() {
		return "pages/welcome";
	}
	@RequestMapping(value = "/404", method = RequestMethod.GET)
	public String notFound() {
		return "404";
	}
	
	@RequestMapping(value = "/500", method = RequestMethod.GET)
	public String sysExcept() {
		return "500";
	}

	//用户管理
	@RequestMapping(value = "/userPage", method = RequestMethod.GET)
	@RequiresPermissions("user:view")
	public String userPage() {
		return "pages/sysManager/userPage";
	}

	//角色管理
	@RequestMapping(value = "/rolePage", method = RequestMethod.GET)
	@RequiresPermissions("role:view")
	public String rolePage() {
		return "pages/sysManager/rolePage";
	}

	//权限管理
	@RequestMapping(value = "/permissionPage", method = RequestMethod.GET)
	@RequiresPermissions("permission:view")
	public String permissionPage() {
		return "pages/sysManager/permissionPage";
	}
	
	//轮播图管理
	@RequestMapping(value = "/rotationPage", method = RequestMethod.GET)
	@RequiresPermissions("rotation:view")
	public String rotationPage() {
		return "pages/content/rotationPage";
	}
}
